<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Tiempo de Atencion de Incidencias</title>
        <script type="text/javascript" src="../extensions/jquery.min.js"></script>
        <script src="../extensions/Highcharts-4.0.4/js/highcharts.js"></script>
        <script src="../extensions/Highcharts-4.0.4/js/modules/exporting.js"></script>
        
        <script type="text/javascript">
            $(function () {
                $('#container').highcharts({
                    chart: {
                        type: 'column'
                    },
                    title: {
                        text: 'Tiempo de Atencion sin el Sistema'
                    },
                    xAxis: {
                        categories: [
                            '1','2','3','4','5','6','7','8','9','10','11','12','13','14','15',
                            '16','17','18','19','20','21','22','23','24','25','26','27','28',
                            '29','30','31','32','33','34','35','36','37','38','39','40','41',
                            '42','43','44','45','46','47','48','49','50','51'
                        ]
                    },
                    yAxis: {
                        min: 0,
                        title: {
                            text: 'Tiempo (días)'
                        }
                    },
                    tooltip: {
                        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                            '<td style="padding:0"><b>{point.y:.1f} ss</b></td></tr>',
                        footerFormat: '</table>',
                        shared: true,
                        useHTML: true
                    },
                    plotOptions: {
                        column: {
                            pointPadding: 0.2,
                            borderWidth: 0
                        }
                    },
                    series: [{
                        name: 'Numero de Incidencias',
                        data: [
                            6,6,6,5,5,5,4,4,4,1,4,4,2,3,3,1,5,4,1,2,
                            1,4,1,2,7,3,5,5,4,2,3,3,6,4,4,3,3,3,5,5,
                            1,5,6,4,5,5,6,5,4,6,6
                        ]
                    }]
                });
                
                $('#container1').highcharts({
                    chart: {
                        type: 'column'
                    },
                    title: {
                        text: 'Tiempo de Atencion con el Sistema'
                    },
                    xAxis: {
                        categories: [
                            '1','2','3','4','5','6','7','8','9','10','11','12','13','14','15',
                            '16','17','18','19','20','21','22','23','24','25','26','27','28',
                            '29','30','31','32','33','34','35','36','37','38','39','40','41',
                            '42','43','44','45','46','47','48','49','50','51'
                        ]
                    },
                    yAxis: {
                        min: 0,
                        title: {
                            text: 'Tiempo (días)'
                        }
                    },
                    tooltip: {
                        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                            '<td style="padding:0"><b>{point.y:.1f} ss</b></td></tr>',
                        footerFormat: '</table>',
                        shared: true,
                        useHTML: true
                    },
                    plotOptions: {
                        column: {
                            pointPadding: 0.2,
                            borderWidth: 0
                        }
                    },
                    series: [{
                        name: 'Numero de Incidencias',
                        data: [
                            1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,
                            1,1,2,3,1,2,1,1,2,1,1,1,2,3,4,2,1,3,3,3,
                            2,2,2,1,1,1,2,3,2,3,1
                        ]
                    }]
                });
            });
        </script>
    </head>
    <body>
        <center>
            <table style='font-family:verdana;width:90%;' border="0">
            <tr><td align='right' colspan='2'><img src='../images/logo/indecopi2.png' width='250'/></td></tr>
            <tr style='font-family:verdana;font-size:15px;'><td colspan='2' align='center'><h3>Tiempo de Atencion de Incidencias</h3></td></tr>
            <tr>
                <td colspan='2'>
                    <table style="width: 100%;">
                        <tr>
                            <td align="right" style='font-family:verdana;font-size:12px;'><b>
                                <?php
                                    $dias1 = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
                                    $meses = array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
                                    
                                    echo $dias1[date('w')]." ".date('d')." de ".$meses[date('n')-1]. " del ".date('Y') ;
                                ?>
                                    </b>
                            </td>
                        </tr>
                    </table>
                    
                </td>
            </tr>
            <tr><td colspan='2' ><hr></td></tr>
            <tr>
                <td align='center' width='90%'>
                    <table style="width: 100%;" border="0">
                        <tr>
                            <td style="width:50%;">
                                <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
                            </td>
                            <td rowspan="2">
                                <hr style=" height: 700px; border: 1px solid;">
                            </td>
                            <td style="width:50%;">
                                <div id="container1" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <br>
                                <table style='font-family:verdana;width:70%;border-collapse: collapse;' border="1" >
                                    <tr style='font-family:verdana;background:#ccc;font-size:12px;height:40px;'>
                                        <th colspan="2" align="center">
                                            <b>Resumen de datos sin el sistema</b>
                                        </th>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td style="width: 70%;">Total de Tiempo (dias):</td>
                                        <td style="width: 30%;" align="center">
                                            <?php echo number_format(201); ?>
                                        </td>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td>Total de Registros :</td>
                                        <td align="center">
                                            52
                                        </td>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td>Tiempo promedio en dias :</td>
                                        <td align="center">
                                            <?php 
                                            $v1 = 201/51;
                                            $prom1 = number_format($v1,0);
                                            echo $prom1;
                                            ?>
                                        </td>
                                    </tr>
                                </table>
                                <br>
                            </td>
                            <td align="center">
                                <br>
                                <table style='font-family:verdana;width:70%;border-collapse: collapse;' border="1" >
                                    <tr style='font-family:verdana;background:#ccc;font-size:12px;height:40px;'>
                                        <th colspan="2" align="center">
                                            <b>Resumen de datos con el sistema</b>
                                        </th>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td style="width: 70%;">Total de Tiempo (dias):</td>
                                        <td style="width: 30%;" align="center">
                                            <?php echo number_format(81); ?>
                                        </td>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td>Total de Registros :</td>
                                        <td align="center">
                                            52
                                        </td>
                                    </tr>
                                    <tr style='font-family:verdana;font-size:12px;height:40px;'>
                                        <td>Tiempo promedio en dias :</td>
                                        <td align="center">
                                            <?php 
                                            $v2 = 81/51;
                                            $prom2 = number_format($v2,0);
                                            echo $prom2;
                                            ?>
                                        </td>
                                    </tr>
                                </table>
                                <br>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>  
    </center>
    </body>